/**
 * @param {number[]} score
 * @return {string[]}
 */
 var findRelativeRanks = function(score) {
    let numArr = [...score].sort((a,b)=>b-a);
    let lastArr = numArr.map((_,index)=>{
        switch(index){
            case 0:
                return "Gold Medal"
            case 1:
                return "Silver Medal"
            case 2:
                return "Bronze Medal"
            default:
                return `${index+1}`   
        }
    })
    let strArr = score.map((item,index)=>{
        for(let i=0; i<numArr.length; i++){
            if(item == numArr[i]) {
                console.log(item,numArr[i],lastArr[index])
                return lastArr[i]
            }
        }
    })
    return strArr
};